package com.dao;

import com.model.FlightModel;

import java.util.List;
import java.util.Map;

/**
 * @Program: exam
 * @ClassName: IFlightDao
 * @Description:
 * @Author: li
 * @Create: 2024-12-23 13:11
 */
public interface IFlightDao {
    /**
     * @Description: 返回所有的航班信息,按航班排序
     * @Author: li
     * @Create: 2024/12/23-13:36
     * @param
     * @Return java.util.List<com.li.domain.FlightModel>
     */
    List<FlightModel> queryAllFlight();

    /**
     * @Description: 按租金倒序
     * @Author: li
     * @Create: 2024/12/23-13:36
     * @param
     * @Return java.util.List<com.li.domain.FlightModel>
     */
    List<FlightModel> queryAllFlightByRentDesc();

    /**
     * @Description: 按租金升序
     * @Author: li
     * @Create: 2024/12/23-13:36
     * @param
     * @Return java.util.List<com.li.domain.FlightModel>
     */
    List<FlightModel> queryAllFlightByRentAsc();

    /**
     * @Description: 根据航班模糊查询
     * @Author: li
     * @Create: 2024/12/23-14:18
     * @param name
     * @Return java.util.List<com.li.domain.FlightModel>
     */
    List<FlightModel> fuzzyQueryByFlight(String name);

    /**
     * @Description: 根据航班id 返回 Flight
     * @Author: li
     * @Create: 2024/12/23-15:47
     * @param id
     * @Return com.li.domain.FlightModel
     */
    FlightModel queryFlightById(int id);

    /**
     * @Description: 更改航班状态
     * @Author: li
     * @Create: 2024/12/23-16:22
     * @param id
     * @param status
     * @Return void
     */
    void changeFlightStatus(int id , int status);

    /**
     * @Description: 分页加模糊查询,返回Flight
     * @Author: li
     * @Create: 2024/12/23-19:58
     * @param pageStart
     * @param pageSize
     * @param map
     * @Return java.util.List<com.li.domain.FlightModel>
     */
    List<FlightModel> pageFlight(int pageStart, int pageSize, Map<String, String[]> map);

    /**
     * @Description: 返回模糊查询的数据总数
     * @Author: li
     * @Create: 2024/7/23-20:57
     * @param map
     * @Return int
     */
    int totalData(Map<String, String[]> map);

    /**
     * @Description: 下架
     * @Author: li
     * @Create: 2024/12/23-20:57
     * @param fid
     * @Return void
     */
    void changFlightDown(int fid);

    /**
     * @Description: 添加新购票
     * @Author: li
     * @Create: 2024/12/23-21:24
     * @param flightModel
     * @Return void
     */
    void addFlight(FlightModel flightModel);

    void updateFlight(FlightModel flightModel);

    /**
     * @Description: 返回购票总数
     * @Author: li
     * @Create: 2024/7/25-15:26
     * @param
     * @Return int
     */
    int totalFlight();


}
